package com.xiaochen.sjzremind.config;

import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.TimeUnit;

/**
 * @author xc
 * @date 2025/10/09/14:15
 * @desc guava配置类
 */
@Configuration
public class GuavaConfig {
    
    @Bean
    public Cache<String,Integer> ammoInfoCache(){
        return CacheBuilder.newBuilder()
                .expireAfterWrite(1, TimeUnit.DAYS)
                .build();
    }
}
